<script setup lang="ts">
const props = defineProps<{
    type: 'recommand' | 'cd' | 'other',
    more: () => void
}>()
</script>
<template>
    <div class="top">
        <div class="type">
            <div class="left">
                <img src="../../assets/red-circle.svg">
                <h2 v-if="props.type == 'recommand'" class="headerTitle">热门推荐</h2>
                <h2 v-if="props.type == 'cd'" class="headerTitle">新碟上架</h2>

            </div>
            <div @click="props.more" class="more">
                <p v-if="props.type == 'recommand' || props.type == 'cd'">更多</p>
                <img src="../../assets/title-arrow-right.svg" />
            </div>
        </div>
    </div>
</template>
<style lang="css" scoped>
.headerTitle {
    margin-left: 5px;
}

.more {
    font-size: 12px;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.more p:hover {
    text-decoration: underline;
    cursor: pointer;
}

.list a:nth-child(-n+4) {
    border-right: 1px solid #ccc;
}

.list a {
    padding: 0 15px;
    color: #666666;
}

.left {
    width: 70%;
    flex-wrap: wrap;
    display: flex;
    align-items: center;
}

.top .type {
    display: flex;
    justify-content: left;
    padding-bottom: 4px;
    align-items: center;
    box-sizing: border-box;
    height: 30px;
    justify-content: space-between;
    border-bottom: #EC4141 1px solid;
}

.left .top {
    padding: 0 15px;
    padding-top: 10px;
    margin-bottom: 15px;
    width: 100%;
}



.top a {
    font-size: 12px;
}

.top h2 {
    font-size: 20px;
    font-weight: normal;
    display: block;
}

.top a {
    text-decoration: none;
    color: #333;
}
</style>